Listing 6 shows how your video output component can stop video output. The implementation of this function is similar to the implementation of QTVideoOutputEnd , but here the default implementation must be called after the hardware has been released.
pascal ComponentResult MyQTVideoOutputEnd (Globals storage)
{
ComponentResult err;
// check that Begin has been called
if (storage->ownHardware == false) {
err = paramErr;
goto bail;
}
// release the hardware
// call default implementation
QTVideoOutputEnd (storage->baseVideoOutput);
// remember that we no longer own the hardware
store->ownHardware = false;
bail:
return err;
}
In the implementation of QTVideoOutputEnd , your component should also display a default image on the video output device to indicate that the device is no longer in use by other software.